Need help with the naming convention for an incremental variable [closed]
Posted
by
iStryker
on Programmers
See other posts from Programmers
or by iStryker
Published on 2012-12-19T17:28:14Z
Indexed on
2012/12/19
23:13 UTC
Read the original article
Hit count: 192
naming
I am using a voting module, that allows you vote either up or down [or reset].
If you vote up, the value is +1.
If you vote down, the value is -1.
If you vote up then down, the value is -1.
I want to extend this module to allow you to vote multiple times, and the votes to be incremental.
Examples
Up, Up = +1, +1 = +2
Up, Up, Down = +1, +1, -1 = +1
I want to create a new boolean variable. If FALSE/NULL then use the old system +1/-1. If TRUE, voting will be incremental.
What should be the name of this variable be? I feel 'incremental' is not the correct name. This module is part of an open-source project and is used on 3,177+ websites, so I want to get the naming convention right.
Naturally, I'll be setting an upper and lower limit the variable be. [ie 5 & 0]
Side-question: Is there a mathematics term to describe something being either +1/-1?
© Programmers or respective owner